package com.cucn.ingmall.product.feign;

import com.cucn.common.to.SkuReductionTO;
import com.cucn.common.to.SpuBoundsTO;
import com.cucn.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 优惠服务远程调用
 *
 * @author KouChaoJie
 * @since: 2021/12/5 16:07
 */
@FeignClient("ingmall-coupon")
public interface CouponFeignService {
    /**
     * 保存Spu的积分信息
     *
     * @param spuBoundsTO spu积分信息
     * @return 统一结果返回
     */
    @PostMapping("/coupon/spubounds/save")
    R saveSpuBounds(@RequestBody SpuBoundsTO spuBoundsTO);

    /**
     * 保存Sku的优惠信息
     *
     * @param skuReductionTO sku优惠信息对象
     * @return 统一结果返回
     */
    @PostMapping("/coupon/skufullreduction/saveInfo")
    R saveSkuReduction(@RequestBody SkuReductionTO skuReductionTO);
}
